import  Mock  from "mockjs";
import user from "./mockData/user.js";


Mock.mock('/api/home/getData',
function(){
    console.log('拦截');
    return [ {
        path: "/",
        name: "home",
        label: "首页",
        icon: "s-home",
        url: "Home/Home"
    },
    {
        path: "/mall",
        name: "mall",
        label: "商品管理",
        icon: "video-play",
        url: "MallManage/MallManage"
    },]
}
)

// 获取用户列表数据
Mock.mock(/api\/user\/getuser/,user.getUserList)

// 创建用户
Mock.mock('/api/user/add','post',user.createUser)

// 更新用户
Mock.mock('/api/user/edit','post',user.updateUser)

// 删除用户
Mock.mock('/api/user/del','post',user.deleteUser)

